#ifndef DVADDSYNONYMDIALOG_H
#define DVADDSYNONYMDIALOG_H

#include <QDialog>
#include "dvDatabaseController.h"
#include "dvDatabaseControllerUsable.h"

namespace Ui {
class dvAddSynonymDialog;
}

class dvAddSynonymDialog : public QDialog, public dvDatabaseControllerUsable
{
    Q_OBJECT
    
public:
    explicit dvAddSynonymDialog(QWidget *parent = 0);
    ~dvAddSynonymDialog();
    inline void setMapId(int id){ m_map = id; }
    inline int  mapId(){ return m_map; }
    inline void setSynonym(const QString& synonym){ m_synonym = synonym; }
    inline QString synonym(){ return m_synonym; }
    inline void setSynonymId(int synonymId){ m_synonym_id = synonymId; }
    inline int synonymId(){ return m_synonym_id; }
    inline void setRegionId(int regionId){ m_region_id = regionId; }
    inline int regionId(){ return m_region_id; }
    inline void setEditMode(bool edit){ m_edit = edit; }

    void Initialize();
    
private:
    Ui::dvAddSynonymDialog *ui;
    int     m_map;
    int     m_synonym_id;
    QString m_synonym;
    QString m_synonymEdit;
    bool    m_edit;
    int     m_region_id;

private slots:
    void currentRegionChanged(int index);
    void clickedOk();
    void clickedCancel();
};

#endif // DVADDSYNONYMDIALOG_H
